From: kaf24@firebug.cl.cam.ac.uk Date: Fri, 28 Apr 2006 13:33:40 +0000 (+0100) Subject: When boot device is cdrom but the cdrom is not bootable, the guest appears X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16108^2~55 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=1f401246c1094f0a069fa7458e2811091c5a8007;p=xen.git When boot device is cdrom but the cdrom is not bootable, the guest appears to hang. This patch fixes this by filling in second- and third-priority fallback boot devices. Signed-off by: Chen Jun --- diff --git a/tools/ioemu/hw/pc.c b/tools/ioemu/hw/pc.c index d2de9abc3d..d2b72ac7fb 100644 --- a/tools/ioemu/hw/pc.c +++ b/tools/ioemu/hw/pc.c @@ -166,14 +166,20 @@ static void cmos_init(uint64_t ram_size, int boot_device, BlockDriverState **hd_ switch(boot_device) { case 'a': case 'b': - rtc_set_memory(s, 0x3d, 0x01); /* floppy boot */ + //rtc_set_memory(s, 0x3d, 0x01); /* floppy boot */ + rtc_set_memory(s, 0x3d, 0x21); /* a->c->d */ + rtc_set_memory(s, 0x38, 0x30); break; default: case 'c': - rtc_set_memory(s, 0x3d, 0x02); /* hard drive boot */ + //rtc_set_memory(s, 0x3d, 0x02); /* hard drive boot */ + rtc_set_memory(s, 0x3d, 0x32); /* c->d->a */ + rtc_set_memory(s, 0x38, 0x10); break; case 'd': - rtc_set_memory(s, 0x3d, 0x03); /* CD-ROM boot */ + //rtc_set_memory(s, 0x3d, 0x03); /* CD-ROM boot */ + rtc_set_memory(s, 0x3d, 0x23); /* d->c->a */ + rtc_set_memory(s, 0x38, 0x10); break; }